Multiplication involving binomials and trinomials in one variable